<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		 <div id="app">
			<div id="demo1">
				<!-- v-for="a1的位置是值，a2的位置是下标 in hobby" -->
				<p v-for="a1,a2 in hobby" >
					<span v-text="a2"></span>----
					<span v-text="a1"></span>
				</p>
				
				<table border="1px" width="50%">
					<tr align="center">
						<td>编号</td>
						<td>名称</td>
						<td>年龄</td>
					</tr>
					<tr align="center" v-for="user in userList">
						<td v-text="user.id"></td>
						<td v-text="user.name"></td>
						<td v-text="user.age"></td>
					</tr>
				</table>
			</div>
			
			
		 </div>
		
		 <script src="../js/vue.js"></script>
		 
		 <script>
			 const app = new Vue({
				 el:"#app",
				 data:{
					hobby: ["敲代码","改bug","钻研技术"],
					userList:[{id:1,name:"BMW",age:123},{id:1,name:"BMW",age:123},{id:1,name:"BMW",age:123}]
							
				 },
				 methods:{
					 
				 }
			 })
		 </script>
	</body>
</html>
